package com.zygh.lz.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zygh.lz.entity.Calendars;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;


@Mapper
public interface CalendarsMapper extends BaseMapper<Calendars> {

    @Select("SELECT DATE_FORMAT(datelist,'%Y-%m-%d') as datelist FROM calendar " +
            "WHERE datelist BETWEEN #{startTime} AND #{endTime}")
    List<Map<String, Object>> findCalendarByTime(@Param("startTime") String startTime,
                                                 @Param("endTime") String endTime);

}
